package com.youkeyi.ddy.cloud.common.api.application.system.ad;

import com.youkeyi.ddy.cloud.common.api.application.system.ad.dto.SystemAdAreaListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.ad.dto.SystemAdCityListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.ad.dto.SystemAdProvinceListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.ad.param.SystemAdAreaListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.ad.param.SystemAdCityListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.ad.param.SystemAdProvinceListCloudParam;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统地址库
 *
 * @Corpor liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【SYSTEM】AD management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-SYSTEM", fallback = SystemAdCloudServiceFallback.class)
@RequestMapping("/system/ad")
public interface SystemAdCloudService {

    // 查询省份
    @ApiOperation(value = "Query System Province List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.ad.SystemAdCloudService.provinceList")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemAdProvinceListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System Province List", dataType = "SystemAdProvinceListCloudParam", dataTypeClass = SystemAdProvinceListCloudParam.class),
    })
    @GetMapping("/province")
    public abstract SystemAdProvinceListCloudDto provinceList(SystemAdProvinceListCloudParam param);


    // 查询城市
    @ApiOperation(value = "Query System City List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.ad.SystemAdCloudService.cityList")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemAdCityListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System City List", dataType = "SystemAdCityListCloudParam", dataTypeClass = SystemAdCityListCloudParam.class),
    })
    @GetMapping("/city")
    public abstract SystemAdCityListCloudDto cityList(SystemAdCityListCloudParam param);


    // 查询区域
    @ApiOperation(value = "Query System Area List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.ad.SystemAdCloudService.areaList")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemAdAreaListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System Area List", dataType = "SystemAdAreaListCloudParam", dataTypeClass = SystemAdAreaListCloudParam.class),
    })
    @GetMapping("/area")
    public abstract SystemAdAreaListCloudDto areaList(SystemAdAreaListCloudParam param);
}
